-- @author shaodongyang
-- ods主站详情日志

use hdp_lbg_supin_zplisting;

insert overwrite table dwd_hism_movielens_links partition (dt='${RUNDATE}')
select
    t1.movie_id, t1.imdb_id, t1.tmdb_id, t2.title, t2.genres
from (
    select movie_id, imdb_id, tmdb_id
    from hdp_lbg_supin_zplisting.ods_hism_movielens_links
    where dt = '${RUNDATE}'
) t1
left join (
    select movie_id, title, genres
    from hdp_lbg_supin_zplisting.ods_hism_movielens_movies
    where dt = '${RUNDATE}'
) t2 on t1.movie_id = t2.movie_id;
